<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <div id="app">
        <h2>{{msg}}</h2>
    <button @click="btn">反转来了</button>
    </div>
    
    <script src="../lib/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data:{
                msg:'hello world'

            },
            methods:{
                btn(){
                    console.log('fanzhaun');
                    
                    this.msg = this.msg.split('').reverse().join('')
                }
            }
        })
    </script>
</body>
</html>